package com.seafood.dto;

import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 冷链运输记录DTO
 */
@Data
public class ColdChainRecordDTO {
    
    private Long id;
    
    private String transportNumber;
    
    private Long orderId;
    
    private String orderNumber;
    
    private Long productId;
    
    private String productName;
    
    @NotBlank(message = "运输公司不能为空")
    private String transportCompany;
    
    @NotBlank(message = "车辆信息不能为空")
    private String vehicleInfo;
    
    @NotBlank(message = "司机信息不能为空")
    private String driverInfo;
    
    private String originAddress;
    
    private String destinationAddress;
    
    @NotNull(message = "计划温度范围不能为空")
    @DecimalMin(value = "-50.0", message = "最低温度不能低于-50°C")
    @DecimalMax(value = "50.0", message = "最高温度不能高于50°C")
    private BigDecimal plannedTempMin;
    
    @NotNull(message = "计划温度范围不能为空")
    @DecimalMin(value = "-50.0", message = "最低温度不能低于-50°C")
    @DecimalMax(value = "50.0", message = "最高温度不能高于50°C")
    private BigDecimal plannedTempMax;
    
    private BigDecimal plannedHumidityMin;
    
    private BigDecimal plannedHumidityMax;
    
    private String startTime;
    
    private String endTime;
    
    private Integer estimatedDurationHours;
    
    private String status;
    
    private String currentLocation;
    
    private BigDecimal currentTemperature;
    
    private BigDecimal currentHumidity;
    
    private String gpsCoordinates;
    
    private Integer alertCount;
    
    private BigDecimal qualityScore;
    
    private String notes;
    
    private String createdAt;
    
    private String updatedAt;
    
    // 最近的几条温度记录
    private List<TemperatureLogDTO> recentTemperatureLogs;
    
    // 未解决的报警
    private List<ColdChainAlertDTO> activeAlerts;
}